package com.itheima.lambda.test2;

public class CalculatorDemo {
    public static void main(String[] args) {
        useCalculator( (a , b)-> a+b);
    }

    public static void useCalculator(Calculator calculator) {
        int result = calculator.calc(10, 20);
        System.out.println(result);
    }
}

interface Calculator {
    int calc(int a, int b);
}